package ddd.damage;
import ddd.Monster;
import ddd.Player;
import ddd.Weapon;
import ddd.constant.MonsterEnum;
import ddd.constant.PlayerEnum;
/**
 * @author dengzhiyuan
 * @version 1.0
 * @time 2021/5/24 18:14
 */
public class DragoonPolicy implements DamagePolicy {

    @Override
    public int calculateDamage(Player player, Weapon weapon, Monster monster) {
        return weapon.getDamage() * 2;
    }

    @Override
    public boolean canApply(Player player, Weapon weapon, Monster monster) {
        return player.getPlayerClass() == PlayerEnum.Dragoon &&
                monster.getMonsterClass() == MonsterEnum.Dragon;
    }


}
